#ifndef PIQUE_H
#define PIQUE_H

#define WINNER 1
#define NO_WINNER 0

// Includes
#include "Player.h"
#include "Deck.h"

// Constantes
const int NB_PLAYERS = 4;
const int PLAYER1 = 1;
const int PLAYER2 = 2;
const int PLAYER3 = 3;
const int PLAYER4 = 4;

const point<int> positionMessage = { 12, 60 };

// Structures
struct pique
{
	player players[NB_PLAYERS];
	deck gameDeck;

	// Tableaux necessaires au jeu
	int playerBets[NB_PLAYERS];
	int winningHands[NB_PLAYERS];
	int playerScore[NB_PLAYERS];
	bool isGood;	
	 
	// Int necessaire a chaque tour
	int currentPlayer = 0;
	int playersPlayed = 0;
	int biggestValue = 0;
	bool isCurrentPlayer;

	int turn;
};

// Prototypes
void Initialize(pique &p);
void Display(const pique &p);
bool VerifyPlay(const pique &p, const hand &ht, int firstPlayer);
void Distribute(pique &p);
int CompareValues(pique &p, hand &ht, int firstPlayer);
void PlayGame(pique &p);
void DisplayStats(const pique &p);
void InitTableHand(hand &ht);
int DetermineWinner(pique &p);

#endif